package com.lemo.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import java.util.Date;

/**
 * user
 *
 * @author 方宗庆
 * @create 2018-11-06 14:49
 */
@Entity
@Table(name = "USER_INFO")
public class User implements Serializable {

  // Fields
  private String id;
  private String name;
  private String pwd;
  private Date createDate;
  private Date modifyDate;

  // Constructors

  /** default constructor */
  public User() {
  }

  /** minimal constructor */
  public User(String id, String name, String pwd) {
    this.id = id;
    this.name = name;
    this.pwd = pwd;
  }

  /** full constructor */
  public User(String id, String name, String pwd, Date createDate, Date modifyDate) {
    this.id = id;
    this.name = name;
    this.pwd = pwd;
    this.createDate = createDate;
    this.modifyDate = modifyDate;
  }

  // Property accessors
  @Id
  @Column(name = "ID", unique = true, nullable = false, length = 36)
  public String getId() {
    return this.id;
  }

  public void setId(String id) {
    this.id = id;
  }

  @Column(name = "NAME",nullable = false, length = 100)
  public String getName() {
    return this.name;
  }

  public void setName(String name) {
    this.name = name;
  }

  @Column(name = "PWD", nullable = false, length = 32)
  public String getPwd() {
    return this.pwd;
  }

  public void setPwd(String pwd) {
    this.pwd = pwd;
  }

  @Temporal(TemporalType.TIMESTAMP)
  @Column(name = "CREATE_DATE", length = 7)
  public Date getCreateDate() {
    return this.createDate;
  }

  public void setCreateDate(Date createDate) {
    this.createDate = createDate;
  }

  @Temporal(TemporalType.TIMESTAMP)
  @Column(name = "MODIFY_DATE", length = 7)
  public Date getModifyDate() {
    return this.modifyDate;
  }

  public void setModifyDate(Date modifyDate) {
    this.modifyDate = modifyDate;
  }
}